package com.yuexun.beilunpatient.ui.bodyCheck.ui;

import android.os.Bundle;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.TextView;

import com.yuexun.beilunpatient.R;
import com.yuexun.beilunpatient.base.BaseKJActivity;
import com.yuexun.beilunpatient.ui.bodyCheck.fragment.Frag_Basic;
import com.yuexun.beilunpatient.ui.bodyCheck.fragment.Frag_Basic_New;
import com.yuexun.beilunpatient.ui.bodyCheck.fragment.Frag_Hos;
import com.yuexun.beilunpatient.ui.bodyCheck.fragment.Frag_Hos_New;
import com.yuexun.beilunpatient.ui.contractmanage.ui.fragment.Frag_Diagnose_Record;
import com.yuexun.beilunpatient.ui.contractmanage.ui.fragment.Frag_Inspection;
import com.yuexun.beilunpatient.ui.contractmanage.ui.fragment.Frag_Record;
import com.yuexun.beilunpatient.ui.contractmanage.ui.fragment.Frag_Test;
import com.yuexun.beilunpatient.ui.contractmanage.ui.fragment.Frag_Video;

import org.kymjs.kjframe.ui.KJFragment;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by Administrator on 2019/4/8 0008.
 */

public class Act_BodyCheck extends BaseKJActivity {
    @Bind(R.id.hos)
    TextView hos;
    @Bind(R.id.diagnose_record_img)
    ImageView diagnoseRecordImg;
    @Bind(R.id.basic)
    TextView basic;
    @Bind(R.id.record_img)
    ImageView recordImg;
    @Bind(R.id.doc_content)
    FrameLayout docContent;

    private KJFragment fragHos;
    private KJFragment fragBasic;

    @Override
    public void setRootView() {
        setContentView(R.layout.act_bodycheck);
        ButterKnife.bind(this);
    }

    @Override
    public void initData() {
        fragHos = new Frag_Hos_New();
        fragBasic = new Frag_Basic_New();
        changeFragment(R.id.doc_content, fragHos);
    }


    @OnClick({R.id.title_back, R.id.diagnose_record_ll, R.id.record_ll})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.title_back:
                finish();
                break;
            case R.id.diagnose_record_ll:
                hos.setTextColor(getResources().getColor(R.color.main_text_02));
                diagnoseRecordImg.setBackgroundColor(getResources().getColor(R.color.main_text_02));
                basic.setTextColor(getResources().getColor(R.color.txt_black1));
                recordImg.setBackgroundColor(getResources().getColor(R.color.transparent));
                changeFragment(R.id.doc_content, fragHos);
                break;
            case R.id.record_ll:
                hos.setTextColor(getResources().getColor(R.color.txt_black1));
                diagnoseRecordImg.setBackgroundColor(getResources().getColor(R.color.transparent));
                basic.setTextColor(getResources().getColor(R.color.main_text_02));
                recordImg.setBackgroundColor(getResources().getColor(R.color.main_text_02));
                changeFragment(R.id.doc_content, fragBasic);
                break;
        }
    }
}
